home *** CD-ROM | disk | FTP | other *** search
/ Eagles Nest BBS 6 / Eagles_Nest_Mac_Collection_Disc_6.TOAST / Other Macintosh Text / ReseditPrime / HMG™ ResEdit Primer 6.0.rsrc / TEXT_136_aText.txt < prev    next >
Encoding:
Text File  |  1990-12-30  |  8.5 KB  |  261 lines

  1.                                          ANIMATED CURSORS...
  2.  
  3. The following information is discussed in this chapter:
  4. ‚Ä¢  How to make animated cursors
  5. ‚Ä¢  Resources covered:  acur, CURS.
  6.  
  7. ‚Ä¢  CURS (CURSor)
  8. The CURS resource contains the little graphic display you get when the Mac is doing something like, loading a program, copying a file, saving information, et cetera.  You've probably seen many examples of this such as a watch with rotating hands, a spinning beach ball, an arrow (for pointing and selecting), an I-beam for insertion point as well as others.  You can find CURS resources in almost every application.
  9.  
  10. ‚Ä¢  acur (aNIMATED curSOR)
  11. The acur resource is what makes a series of cursors sequence through.  It tells the Finder, how many cursors there are in the sequence, their execution order, and how fast to frame through them.  I have only found the acur resource in the Finder.  Most applications do not use this resource, but have the information about their cursors buried in their code.  That doesn't mean that the cursors can't be changed.  They can, as long as the information about the cursors remains the same.  You'll understand later in this chapter.
  12.  
  13. ‚Ä¢  Let's make an Animated Cursor...
  14. To start with, launch ResEdit and from the File Menu (this depends on how you have your preferences selected in ResEdit), select New.  You will be presented with a standard Open Dialog Box.  Name the file and click OK.  You now have a new open window with nothing in it.  From the Resource Menu, select Create New Resource.
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29. Find the CURS resource and click OK.  Now you're presented with the window in which to create your cursor.
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48. If you're used to using a Fat Bits editor, you should have no problem.  Your Tools Pallette is on the left.  The center frame is your work area.  Adjacent to the work area are two buttons, one to create your cursor Pointer and the other to create the cursor Mask.  On the extreme right are various backgrounds that will display how your cursor will appear on the desktop.  The small "x" that appears in the work area is the hotSpot point which alligns the cursor with the mouse location.  You can change this location by selecting the X tool from the Tools Pallette.  From this point on, I'll use my own custom cursors and resources as examples.
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.                                                 (Pointer)
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.                                        (Mask)
  85.  
  86. Now create your cursor.  When you're satisfied choose Select All followed by Copy from the Edit Menu.  Click on the Mask button and choose Paste PICT from the Edit Menu.  Fill in appropriate "holes" to get your desired effect.  Go to the CURS Menu and select Try Pointer.  Your arrow will change to your cursor.  Move it about the screen.  Go back to the CURS Menu and select Try Pointer.  Now make any changes you want.  When you're satisfied, choose Select All followed by Copy from the Edit Menu.  Then close the window.  From the Resource Menu, select Create New Resource, and you'll get another blank cursor-editor window.  Now choose Paste from the Edit Menu.  You should have the same cursor as the first one you created.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.                                                (Pointer)
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.                                                  (Mask)
  123.  
  124. Modify this one to show a different position as I have done.  Again follow the same instructions as you did before to create the first cursor.  To make a sequence, double click the first, copy it, paste it in the third.  Double click the second, copy it, and paste it in the fourth.  Do this as often as you desire, until you have completed a series as I have.
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141. Now we need to change the information about each cursor.  Select the first cursor and from the Resource Menu, choose Get Resource Info.  You'll now have a window like this:
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159. Change the ID# to anything equal to or above 256.  Check the Preload box.  Close the window and select the next cursor in your series.  Do the same thing you just did but increment the ID# by 1 (257).  Repeat this procedure for all of your cursors, each time incrementing the last number used by 1 (258, 259, 260, etc.)
  160.  
  161. You've done a lot of work by now, so let's not lose it.  Close all windows, saving changes when prompted.  Relax for a few minutes.  Grab a cup of coffee, pet the dog (or cat), kiss your wife or girlfriend (or both).  When you're ready we'll start the next phase...
  162.  
  163. Now that you're rested, we'll begin the next phase... creating the acur resource for your animated cursor.  Begin by opening your file in ResEdit.  A window will appear showing the CURS resource.  Go to the Resource Menu and select Create New Resource.
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178. Select acur and click OK.  You're now presented with the open acur resource in which to tell the Finder what you want displayed.
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192. Enter in the number of cursors you have in your sequence.
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206. The Used a "frame" counter tells the Finder how long to hold before switching frames (each cursor).  Enter a "0" for our example (you can experiment with this later, on your own time, not mine).  You see the row of *****?  Select them, and from the Resource Menu, select Insert New Field(s).   Another box will open below the *****.  Enter the first ID# of your cursor set (256).  (Note:  Since I'm using my own cursor set for this example, my first curs ID# begins at 300).
  207.  
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224. Now select the next set of ***** and repeat the process.  Keep doing this until you have listed your complete set of cursor ID#'s.  When you have finished, close the window...
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232. Next, we need to change the information about your new acur resource.  Select the acur ID = (some number or default 128).  From the Resource Menu, select Get Resource Info.  Change the ID# to 0.  Check Preload.
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250. Finally, close all the windows and save your changes when prompted to.  Quit the ResEdit program.  You have now finished creating your resources.  The next stage is to install them, so take another break...
  251.  
  252. We're ready to install your new resources.  Make a copy of your Finder.  I would put this copy on a blank floppy so you can't open the wrong file.  Now launch ResEdit and open the copy of the Finder.  You should see all of the resources contained in the copy of the Finder.  Now open the file you created containing your new resources.  While holding down the Command Key, select both your new acur and CURS resources.  From the Edit Menu, select Copy.  Now select the copy of the Finder.  From the Edit Menu, select Paste.  Answer Yes to replacing the same resources.  After you're finished, save your changes and quit ResEdit.  
  253.  
  254. Now open your System Folder and move your "original" Finder to another folder (create one naming it temp), making sure that it resides outside of the System Folder.  Next move your "new" Finder into your System Folder and rename it "Finder".  And finally, reboot your Mac to have the new Finder load.  Your new animated cursor should now work.  
  255.  
  256. Test your animated cursor by duplicating a large file, or doing a disk to disk copy.   You may notice from time to time that the stationary watch cursor appears.  That's because that cursor is being called from the System file.  You can change that too, by opening the CURS resource in the (copy of) System File, select the watch cursor and double click it.  You again have the Fat Bits editor in which to change the watch to something else.  Then follow the same procedures as before, with the Finder. 
  257.  
  258. ‚Ä¢  Changing cursors in existing applications
  259. As I mentioned before, most applications which contain animated cursors do not have the acur resource.  Since that information is contained in their code you can change their cursors, but you must keep the same information recorded in their cursors and apply it to your cursors.  
  260.  
  261. For example,  if there are only four cursors with ID#'s of 300, 301, 302 and 303 with the attributes of preload and purgeable, then your cursors must contain the identical information and the same number of cursors.  The safest way to change them is to use the Copy/Paste method you used to duplicate your cursors.  In other words, open your specific cursor (remember the editor window?) and Copy it.  Then open the application's specific cursor and Paste in your cursor picture.  Do the same for all of the cursors in the application.  That's all there is to it!  Remember, to WORK ON A COPY OF THE APPLICATION; 'cause if you screw-up you're in deep s--t!  Or another way to put it, "the feces has hit the rotary oscilator".  Nuff said ‚Äî enjoy!